const Service = require('egg').Service;

class ConfigService extends Service {

  /**
   * 根据ID获取单条配置参数
   * @param {Number} id 
   */
  async findOne(id = 1) {
    const { ctx } = this;
    const result = await ctx.db.get('config', { id });
    return result;
  }
}

module.exports = ConfigService;